import {adminUrl} from "@/utils/baseUrl.js"
import request from '@/utils/request'

// 创建奖励惩罚表
export function createStudentRewardPunish(data) {
  return request({
    url: adminUrl + '/collegebase/student-reward-punish/create',
    method: 'post',
    data: data
  })
}

// 更新奖励惩罚表
export function updateStudentRewardPunish(data) {
  return request({
    url: adminUrl + '/collegebase/student-reward-punish/update',
    method: 'put',
    data: data
  })
}

// 删除奖励惩罚表
export function deleteStudentRewardPunish(id) {
  return request({
    url: adminUrl + '/collegebase/student-reward-punish/delete?id=' + id,
    method: 'delete'
  })
}

// 获得奖励惩罚表
export function getStudentRewardPunish(id) {
  return request({
    url: adminUrl + '/collegebase/student-reward-punish/get?id=' + id,
    method: 'get'
  })
}

// 获得奖励惩罚表分页
export function getStudentRewardPunishPage(query) {
  return request({
    url: adminUrl + '/collegebase/student-reward-punish/page',
    method: 'get',
    params: query
  })
}

// 导出奖励惩罚表 Excel
export function exportStudentRewardPunishExcel(query) {
  return request({
    url: adminUrl + '/collegebase/student-reward-punish/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
